﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="EditCate_1.aspx.cs" Inherits="Manage_Modle_CateGory_EditCate_1" %>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>无标题页</title>
    <link href="../../css/mainFrom.css" rel="stylesheet" type="text/css">

    <script language="javascript" src="../../js/common.js"></script>

    <script language="javascript" type="text/javascript" src="../../js/calendar.js"></script>

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <script language="javascript" type="text/javascript" src="../../js/Hz2Py.js"></script>
    
    <script language="javascript" type="text/javascript" src="../../js/guid.js"></script>
      <script type="text/javascript" src="../../ckeditor/ckeditor.js" ></script>
</head>
<body>

<script language="javascript">
 //设置关键字为名称的拼音
    function  setModeKey(obj)
    {
  
          var text_modelkey=document.getElementById("txtCate_Key");
      if(text_modelkey!=null)
      {   
            var val=obj.value;
            if(val.length>4)
            {
                 val=val.substring(0,4);
            }
           
            
            var modelKey=myConvert(val);
             if(modelKey.length>20)
             {
                modelKey=modelKey.substring(0,20);
             }
           
             
//             text_modelkey.value=editModelKey(modelKey);
      }
    }
//    //递归处理关键字，防止重复
    function editModelKey(modelKey)
    {
         for(var i=0;i<items.length;i++)
        {
            if(items[i][4]==modelKey)
            {
                modelKey+="a";
                 modelKey=editModelKey(modelKey);
                return modelKey;
            }
        }
        return modelKey;
    }

</script>
    <form id="form1" runat="server">
        <div>
            <table width="100%" border="0" cellspacing="0" cellpadding="0" class="content-table">
                <tr onmouseover="setbg2(this)" onmouseout="setbg1(this)">
                    <th class="thright">
                        属性项
                    </th>
                    <th class="thleft none">
                        属性值
                        <asp:Label ID="lab_Title" runat="server" ForeColor="Red"></asp:Label></th>
                </tr>
                <tr style="background: #F2F2F2;" onmouseover="setbg2(this)" onmouseout="setbg1(this)">
                    <td width="80" class="tdrightpad0">
                        类型名称
                    </td>
                    <td>
                        <asp:TextBox ID="txb_CateName" runat="server" Width="287px" ></asp:TextBox>
                        <asp:RequiredFieldValidator ID="Re_CateName" runat="server" ControlToValidate="txb_CateName"
                            ErrorMessage="必填项"></asp:RequiredFieldValidator></td>
                </tr>
                <tr onmouseover="setbg2(this)" onmouseout="setbg1(this)">
                    <td class="tdrightpad0">
                        类型图片
                    </td>
                    <td>
                        <asp:TextBox ID="txtCate_Image" runat="server" Width="250px"></asp:TextBox>
                        <input type="button" value="浏览" onclick="ShowImageDialog(840, 520, document.getElementById('txtCate_Image'))" />
                    </td>
                </tr>
                <tr style="background: #F2F2F2;" onmouseover="setbg2(this)" onmouseout="setbg1(this)">
                    <td class="tdrightpad0">
                        类型排序
                    </td>
                    <td>
                        <asp:TextBox ID="txb_CateOrder" runat="server" Width="51px"></asp:TextBox>&nbsp;
                        <asp:RegularExpressionValidator ID="Re_CateOrder" runat="server" ControlToValidate="txb_CateOrder"
                            ErrorMessage="必须为整数型" ValidationExpression="^\s*[0-9]+\s*$"></asp:RegularExpressionValidator></td>
                </tr>
                <tr onmouseover="setbg2(this)" onmouseout="setbg1(this)">
                    <td class="tdrightpad0">
                        分类标识
                    </td>
                    <td>
                        <asp:TextBox ID="txtCate_Key" runat="server" Width="51px"></asp:TextBox>&nbsp;
                        <%--<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtCate_Key"
                    ErrorMessage="必填项"></asp:RequiredFieldValidator>          
                <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtCate_Key"
                    ErrorMessage="只能由字母或数字组成" ValidationExpression="^[A-Za-z0-9]+$"></asp:RegularExpressionValidator>--%>
                    </td>
                </tr>
                <tr style="background: #F2F2F2;" onmouseover="setbg2(this)" onmouseout="setbg1(this)">
                    <td class="tdrightpad0">
                        设置链接
                    </td>
                    <td>
                        <asp:TextBox ID="txb_CateUrl" runat="server" Width="300px"></asp:TextBox>
                    </td>
                </tr>
                <tr onmouseover="setbg2(this)" onmouseout="setbg1(this)">
                    <td class="tdrightpad0" style="height: 24px">
                        发布时间
                    </td>
                    <td style="height: 24px">
                        <asp:TextBox ID="txb_AddTime" runat="server"></asp:TextBox>&nbsp;
                        <img style="cursor: hand" onclick="setday(document.getElementById('txb_AddTime'))"
                            src="../../images/calendar.gif" align="absMiddle" />
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txb_AddTime"
                            ErrorMessage="必填项"></asp:RequiredFieldValidator></td>
                </tr>
                <tr style="background: #F2F2F2;" onmouseover="setbg2(this)" onmouseout="setbg1(this)">
                    <td class="tdrightpad0" style="height: 24px; width: 90px;">
                        状态：</td>
                    <td style="height: 24px">
                        <asp:RadioButtonList ID="rad_State" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow">
                            <asp:ListItem Selected="True" Value="0">&nbsp;&nbsp;关闭&nbsp;&nbsp;&nbsp;&nbsp;</asp:ListItem>
                            <asp:ListItem Value="1">&nbsp;&nbsp;显示</asp:ListItem>
                        </asp:RadioButtonList>
                    </td>
                </tr>
                <tr style="background: #F2F2F2;" onmouseover="setbg2(this)" onmouseout="setbg1(this)">
                    <td class="tdrightpad0" style="height: 24px; width: 90px;">
                        是否需要登录：</td>
                    <td style="height: 24px">
                        <asp:RadioButtonList ID="rad_MemberRole" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow">
                            <asp:ListItem Selected="True" Value="|0|">&nbsp;&nbsp;不需要&nbsp;&nbsp;&nbsp;&nbsp;</asp:ListItem>
                            <asp:ListItem Value="|1|">&nbsp;&nbsp;需要</asp:ListItem>
                        </asp:RadioButtonList>
                    </td>
                </tr>
                <tr style="background: #F2F2F2;" onmouseover="setbg2(this)" onmouseout="setbg1(this)">
                    <td class="tdrightpad0" valign="top" style="padding-top: 4px;">
                        类型说明
                    </td>
                    <td>
                                    <div>
                   <asp:TextBox ID="txb_CateIntor" runat="server" TextMode="MultiLine"  style="height:380px;"></asp:TextBox>
	            <script type="text/javascript"> CKEDITOR.replace( '<%= txb_CateIntor.ClientID %>',
                    {
                     filebrowserBrowseUrl: '../../ckfinder/ckfinder.html',
                     filebrowserImageBrowseUrl: '../../ckfinder/ckfinder.html?Type=Images',
                     filebrowserFlashBrowseUrl: '../../ckfinder/ckfinder.html?Type=Flash',
                     filebrowserUploadUrl: '../../ckfinder/core/connector/aspx/connector.aspx?command=QuickUpload&type=Files',
                     filebrowserImageUploadUrl: '../../ckfinder/core/connector/aspx/connector.aspx?command=QuickUpload&type=Images',
                     filebrowserFlashUploadUrl: '../../ckfinder/core/connector/aspx/connector.aspx?command=QuickUpload&type=Flash'
		             ,toolbar : 'Basic'
                 }
);</script>
      </div>
                 
                      
                    </td>
                </tr>
                
                <tr>
                    <td class="tdrightpad0" id="href-blue">
                        &nbsp;
                    </td>
                    <td class="food">
                        <asp:Button ID="btnSave" runat="server" Text="保  存" CssClass="button" OnClick="btnSave_Click" />
                        <input type="reset" name="btnCancel" value="取  消" id="btnCancel" class="button" />&nbsp;<asp:Button
                            ID="btnDel" runat="server" Text="删  除" CssClass="button" OnClick="btnDel_Click" />
                    </td>
                </tr>
            </table>
        </div>
    </form>
    <asp:Label ID="lab_Script" runat="server" ForeColor="Red"></asp:Label>
</body>
</html>
